<?php
/*
Engineer: Alex Arey
Updated: 12/2/2011
Description: Shows current contacts by first and last name and provides links
to editting and deleting contact information or setting primary contacts

*/


 ?>

<h3>Your current contacts:</h3>
<dl>
<table>
<tr> <th> Name </th> <th> Options </th><tr>
    <?php foreach ($this->contacts as $contact): ?>
    <tr align = "center">
    <td> 
	
	        <a href="<?php echo $this->url(array('controller'=>'profile', 
            'action'=>'editcontact', 'contactid'=>$contact['CONTACTID']));?>">  <?php echo $contact['LASTNAME'] . ", " . $contact['FIRSTNAME'];?></a></td>
	 <td>
	<a href="<?php echo $this->url(array('controller'=>'profile', 
            'action'=>'setprimarycontact', 'contactid'=>$contact['CONTACTID']));?>">Set As Primary Contact</a>
			/
		<a href="<?php echo $this->url(array('controller'=>'profile', 
            'action'=>'deletecontact', 'contactid'=>$contact['CONTACTID']));?>">Delete</a>
    </td>
</tr>
    <?php endforeach ?>
<tr>
	<td colspan = "2" align = "center">
		<a href = "<?php echo $this->url(array('action'=>'addcontact')); ?>">
			Add a New Community Partner Contact</a>
	</td>
</tr>
	</table>
</dl>

